/**
 * 
 */

function fnavg()
{
	var b = document.getElementById('btnavg');
	b.onclick = function()
	{
		var f = document.frmavg;
		var n1 = Number(frmavg.num1.value);
		var n2 = Number(frmavg.num2.value);
		var tot = n1+n2;
		alert('합계: '+tot+'평균: '+tot/2);
	}
}